const { register } = require('@swc-node/register/register')
const { configure } = require('enzyme')
const Adapter = require('enzyme-adapter-react-16')
const ts = require('typescript')

require('tsconfig-paths/register')

register({
  experimentalDecorators: true,
  emitDecoratorMetadata: true,
  dynamicImport: true,
  module: ts.ModuleKind.CommonJS,
  jsx: ts.JsxEmit.ReactJSXDev,
  jsxImportSource: '@emotion/react',
  target: ts.ScriptTarget.ES2020,
  allowSyntheticDefaultImports: true,
  esModuleInterop: true,
})

require('@abraham/reflection')

configure({ adapter: new Adapter() })

global.__IS_SERVER__ = false
